package com.spdb.oa.type;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;

@JsonTypeInfo(include=As.PROPERTY, use=JsonTypeInfo.Id.CLASS, visible=false)
public class OpinionFormElement {
	public String id;
	public String name;
	public String displayName;
	public String controlType;
	public boolean required;
	public boolean visible;
	public boolean enabled;
	public String dataType;
	//content is only for submit form, and when used to convert to xml this field couldn't be null,
	//the child class LimitedOpinionElement will convert to xml, the null content will raise exception for xml processing.
	public String content = "";
	public OpinionFormElement(String id, String name, String displayName, String controlType, boolean required,
			boolean visible, boolean enabled, String dataType) {
		super();
		this.id = id;
		this.name = name;
		this.displayName = displayName;
		this.controlType = controlType;
		this.required = required;
		this.visible = visible;
		this.enabled = enabled;
		this.dataType = dataType;
	}
	public OpinionFormElement() {
		super();
	}
	@Override
	public String toString() {
		return "OpinionFormElement [id=" + id + ", name=" + name + ", displayName=" + displayName + ", controlType="
				+ controlType + ", required=" + required + ", visible=" + visible + ", enabled=" + enabled
				+ ", dataType=" + dataType + "]";
	}

	
}
